﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ETL.Entity;

namespace ETL.Business.Models
{
    public class ProjectUserModel
    {
        private readonly RESOURCE_INSTANCES _resourceInstances;
        private readonly APP_USERS _appUser;

        #region Constructor
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="projectAllNames"></param>
        public ProjectUserModel(APP_USERS appUser)
        {
            this._appUser = appUser;
        }

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="projectAllNames"></param>
        public ProjectUserModel(APP_USERS appUser, RESOURCE_INSTANCES resourceInstances)
        {
            this._appUser = appUser;
            this._resourceInstances = resourceInstances;
        }

        #endregion

        #region Attributes
        public string Id { get { return _appUser.DSE_ID; } }

        public string FirstName { get { return _appUser.FIRST_NAME; } }

        public string SurName { get { return _appUser.SURNNAME; } }

        public string FullName { get { return _appUser.FIRST_NAME + " " + _appUser.SURNNAME; } }

        public bool IsActive
        {
            get { 
                if(_resourceInstances != null)
                {
                    return true;
                }
                else
                {
                    return false;
                }
            
            }
        }
        #endregion

    }
}
